{# src/Pyaf/GymBundle/Resources/views/AdminProfesor/list.html.twig #}
{% extends "PyafGymBundle::layout_admin.html.twig" %}

{% block title %} Pyaf {% endblock %}
{% block tituloSector %}<i class=" icon-book"></i> Asistencias - Registro de Faltas por Aviso {% endblock %}
{% block nombreSector %} Asistencias / Aviso de Falta{% endblock %}
{% block dashboardContent %}{% endblock %}
{% block content %}
<div class="container-fluid" id="content-area" style="padding-right: 30px; border-color: #0091DB;">   
    <div class="row-fluid">
            <div class="box">
                <div class="box-head"><i class="icon-table"></i><span>Tablero de Alumnos</span></div>
                <div class="box-body">
                    <div class="span4">
                        <div class="mini-layout">
                            <div class="mini-layout-header"><i class="icon-table"></i><span>Días Faltas del Alumno</span></div>
                            <div class="mini-layout-body">
                                <table id="table" class="table table-nomargin table-bordered dataTable table-striped table-hover">
                                    <thead><tr>
                                            <th>Nombre y Apellido</th>                                                
                                            <th>Faltar</th>
                                    </tr></thead>
                                    <tbody>

                                    {% for alumno in alumnos %}

                                        <tr style="">
                                            <td>{{alumno.persona.nombre}} {{alumno.persona.apellido}}</td>
                                            <td style="text-align: center;">
                                                <button class='button button-basic btn-min button-basic-blue'
                                                        onclick='showAlumno("{{ path('avisos_falta_calendario', { 'id': alumno.id }) }}","{{ path('avisos_recupera_calendario', { 'id': alumno.id }) }}" )'>
                                                    <i class="icon-rss"></i> ver</button>
                                            </td>
                                        </tr>

                                    {% endfor %}

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="span8">
                        <div class="mini-layout">
                            <div class="mini-layout-header"><i class="icon-table"></i><span>Días Faltas del Alumno</span></div>
                            <div class="mini-layout-body">
                                <div id="box-falta-alumno"></div>  
                            </div>
                        </div>
                    </div>
                        <div class="span8"></div>
                    <div class="span8">
                        <div class="mini-layout">
                            <div class="mini-layout-header"><i class="icon-table"></i><span>Días Recuperación del Alumno</span></div>
                            <div class="mini-layout-body">
                                <div id="box-recupera-alumno"></div>  
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    </div>
</div>

{% endblock %}
    
{% block javascripts %}
    <script type="text/javascript">

                 
        function showAlumno(dataFalta, dataRecupera){                
            $('#box-falta-alumno').load(dataFalta);
            $('#box-recupera-alumno').load(dataRecupera);
        };
        

    </script>
{% endblock %}